# encoding=utf-8
from run_pandas import get_season_best_players, get_season_best_players_rank, get_season_playoff_team_top, \
    get_season_team_rank, get_season_list


class SeasonService:

    @staticmethod
    def get_season_list():
        season_list = get_season_list()
        result_data = {
            'season_list': season_list,
            'count': len(season_list)
        }
        return result_data

    @staticmethod
    def get_season_best_player(season_name):
        return get_season_best_players(season_name)

    @staticmethod
    def get_season_best_player_rank(season_name):
        player_list = get_season_best_players_rank(season_name)
        result_data = {
            'player_list': player_list,
            'count': len(player_list)
        }
        return result_data

    @staticmethod
    def get_season_playoff_team_top(season_name):
        team_list = get_season_playoff_team_top(season_name)
        result_data = {
            'team_list': team_list,
            'count': len(team_list)
        }
        return result_data

    @staticmethod
    def get_season_team_rank(season_name):
        return get_season_team_rank(season_name)
